<?php

class RotatingAds extends AppModel {
  public $name = 'RotatingAds';

  public $validate = array(
      'RotatingAds.ad_location' => array(
          'name' => 'notEmpty',
          'message'=>'Ad location is required'
      ),
       'start_date' => array(
          'formatRule' => array(
              'rule' => array('validDateFormat'),
              'allowEmpty' => false,
              'message' => 'Enter a valid Start date (mm/dd/yyyy)'
          ),
          'dateRestrictionRule' => array(
              'rule' => array('dateBefore', 'end_date'),
              'message' => 'Start date must be before End date'
      )),
      'end_date' => array(
          'rule' => array('validDateFormat'),
          'allowEmpty' => false,
          'message' => 'Enter a valid End date (mm/dd/yyyy)'
      )
  );   
  
}

?>
